package vn.bang.xiangqi.infrastructure;

public class Position
{
    private int rowIndex;
    private int columnIndex;

    public Position()
    {
        rowIndex = 0;
        columnIndex = 0;
    }

    public Position(int rowIndex, int columnIndex)
    {
        this.rowIndex = rowIndex;
        this.columnIndex = columnIndex;
    }

    public Position Add(Vector vector)
    {
    	Position newPosition = new Position(this.rowIndex + vector.getRow(), this.columnIndex + vector.getColumn()); 
        return newPosition;
    }
    
    public int getRowIndex() {
		return rowIndex;
	}

	public void setRowIndex(int rowIndex) {
		this.rowIndex = rowIndex;
	}

	public int getColumnIndex() {
		return columnIndex;
	}

	public void setColumnIndex(int columnIndex) {
		this.columnIndex = columnIndex;
	}

	
	//TODO
//	@Override
//	public boolean Equals(Object obj)
//    {
//        if (null == obj)
//        {
//            return false;
//        }
//
//        Position position = obj as Position;
//        if (null == position)
//        {
//            return false;
//        }
//
//        if (ColumnIndex == position.ColumnIndex
//            && RowIndex == position.RowIndex)
//        {
//            return true;
//        }
//
//        return false;
//    }

	//TODO
//	@Override
//    public int GetHashCode()
//    {
//        return ColumnIndex.GetHashCode() ^ RowIndex.GetHashCode();
//    }

}